/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Library General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
 */

/**
 * @version base.h 0.0.1
 * @package Comoro
 * @author Dr.NP <np@bsgroup.org>
 *
 * Base server header
 */

#define DEFAULT_BASE_SRV_PORT				64999
#define SESSION_LIST_SIZE					4
#define SESSION_CHECK_INTERVAL				10

/* BEGIN OF STRUCTS */

/* END OF STRUCTS */

/* BEGIN OF FUNCTION DEFINE */
int base_init									();
void base_on_data								(int, void *, unsigned int);
void base_on_conn								(int);
void base_on_close							(int);
void base_on_session							(unsigned long long, char *, char *, int);
void base_from_center						(int, void *, int);
int base_process_command						(int, char *, int);
int base_special_command						(int, unsigned int, unsigned int);
void base_reg_login							();
void base_report_login						(void *);
void base_get_status							(char *);

int session_list_add							(unsigned long long, char *, char *, int);
int session_list_del							(int);
int session_list_find_free					();
int session_list_get							(char *, int);
void session_list_check_cb					(void *);
/* END OF FUNCTION DEFINE */
